package org.itboys.core.common;

/**
 * @Author：贾琦磊
 * @Date：2018/12/24
 * @Description：关于钱包变更记录的枚举类
 */
public enum WalletRecordEnum {

    CHONGZHI(1,"用户充值"),
    TIXIAN(2,"提现"),
    XIAOFEI(3,"用户消费"),
    XUZU(4,"订单续租"),
    KOUYAJIN(5,"租户扣押金"),
    YAJINTUIHUAN(6,"租户押金退还"),
    CHIYOUSHANG(7,"持有商产生收益"),
    PEISONGSHANG(8,"配送商产生收益"),
    HUISHOUSHANG(9,"回收商产生收益"),
    MAIDUAN(10,"用户买断"),
    ZUJINTUHUAN(11,"租金退还"),
    TXBOHUI(12,"提现驳回")
    ;


    /**type类型*/
    private Integer code;
    /**备注*/
    private String desc;

    WalletRecordEnum(Integer code,String desc){
        this.code=code;
        this.desc=desc;
    }

    public static String getDesc(Integer code){
        if(code==null) return "";
        for (WalletRecordEnum e :
                WalletRecordEnum.values()) {
            if(code.equals(e.getCode())){
                return e.getDesc();
            }
        }
        return "";
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
